/**
 * @param {string} s
 * @param {number[][]} queries
 * @return {boolean[]}
 */
var canMakePaliQueries = function (s, queries) {
  let res = []
  for (let i = 0; i < queries.length; i++) {
    let [left, right, times] = queries[i]
    let trimString = s.substring(left, right + 1)
    if (trimString.length == 1) {
      res[i] = true
    } else {
      let start = 0, end = trimString.length - 1, flag = true
      while (start <= end) {
        if (trimString[start] == trimString[end]) {
          start++
          end--
        } else {
          if (times > 0) {
            times--
            start++
            end--
          } else {
            flag = false
            break
          }
        }
      }
      res[i] = flag
    }
  }
  return res
};

canMakePaliQueries("hunu", [ [0, 3,1]])